package main.manager
{
	import flash.display.Sprite;
	
	import main.module.desktop.DesktopUI;

	public class UIManager
	{
		private static var myinstance:UIManager = new UIManager();
		
		private var uiLayer:Sprite;
		
		public function UIManager()
		{
			if(myinstance != null)
				throw new Error("single instance");
		}
		
		public static function get instance():UIManager
		{
			return myinstance;
		}
		
		/**
		 * 设置ui层
		 */
		public function set main(_sprite:Sprite):void
		{
			uiLayer = _sprite;
			DesktopUI.instance.init();
		}
		
		public function get main():Sprite
		{
			return uiLayer;
		}
				
	}
}



